package com.qd.common.panda.domain.entity.stroke;
import com.cdqidi.dict.annotation.FieldBind;
import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import com.qd.common.dict.DictConstant;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import java.time.LocalDateTime;

/**
 * 重试记录
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class UserStrokeOrderRetryDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "记录ID不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    @Size(max = 50, message = "记录ID长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String orderRetryId;
    /**
     * 订单类型:5商城购物
     */
    private Integer orderType;
    /**
     * 订单类型显示
     */
    private String orderTypeDisplay;
    /**
     * 操作时间
     */
    private LocalDateTime addTime;
    /**
     * 状态值:1成功
     */
    @NotNull(message = "状态值不能为空", groups = DefaultGroup.class)
    private Integer stateCode;
    /**
     * 状态值显示
     */
    private String stateCodeDisplay;
    /**
     * 异常信息
     */
    @NotBlank(message = "异常信息不能为空", groups = DefaultGroup.class)
    @Size(max = 500, message = "异常信息长度不能超过{max}位", groups = DefaultGroup.class)
    private String errMsg;
    /**
     * 订单ID
     */
    @NotBlank(message = "订单ID不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "订单ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String orderId;
    /**
     * 处理人
     */
    @FieldBind(targetField = "handlePersonIdDisplay",processName = DictConstant.SYS_LOGIN_USER)
    @Size(max = 50, message = "处理人长度不能超过{max}位", groups = DefaultGroup.class)
    private String handlePersonId;
    /**
     * 处理人显示
     */
    private String handlePersonIdDisplay;
    /**
     * 处理人单位
     */
    @FieldBind(targetField = "handleOrgIdDisplay",processName = DictConstant.SYS_ORG)
    @Size(max = 50, message = "处理人单位长度不能超过{max}位", groups = DefaultGroup.class)
    private String handleOrgId;
    /**
     * 处理人单位显示
     */
    private String handleOrgIdDisplay;

    @Override
    public void freeData() {
        this.orderRetryId = null;
        this.orderType = null;
        this.orderTypeDisplay = null;
        this.addTime = null;
        this.stateCode = null;
        this.stateCodeDisplay = null;
        this.errMsg = null;
        this.orderId = null;
        this.handlePersonId = null;
        this.handlePersonIdDisplay = null;
        this.handleOrgId = null;
        this.handleOrgIdDisplay = null;
        super.freeData();
    }
}
